#include "error_gl.h"

namespace venus {	
bool CheckErrorsGL(const char* location) {	
  GLuint error_id;
  const char *error_str;
  bool error_occurred = false;
  while (error_id = glGetError()) {
    error_str = reinterpret_cast<const char*>(gluErrorString(error_id));
    Error("In \"%s\": error: %u, %s", location, error_id, error_str);
    error_occurred = true;
  }
  return error_occurred;
}
} // namespace venus
